package components.tools.cutouts
{
	import UIFree.ObjectEvent;
	import UIFree.uif_component;
	
	import classes.clt_events;
	
	import components.se_box;
	import components.clt_previewItem;
	
	import data.cd_masks;
	
	import flash.geom.Rectangle;

	public class clt_cutouts extends se_box
	{
		public function clt_cutouts(parent:uif_component, ax:int=0, ay:int=0, awidth:int=0, aheight:int=0, atabwidth:int=0, styleClass:String='', countInfo:Boolean=true)
		{
			super(parent, cd_masks, ax, ay, awidth, aheight, atabwidth, styleClass, countInfo);
		}
		
		override protected function doItemSelect(e: ObjectEvent): void {
			super.doItemSelect(e);
			if (workspace) workspace.waitEvent(new ObjectEvent(clt_events.SELECTCUTOUT, e.object));
		}
		
		override protected function createListItem(_scroll: uif_component, inner: Rectangle, index: int): clt_previewItem {
			return new clt_previewCutout(index, _scroll, inner.x, inner.y, inner.width, inner.height, _filterList[index], style['item_class']);
		}		
	}
}